package com.internetCafes.spms.web.customer.model.customer;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * 获取可转让部门人员树
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class CustomerTransferUserTreeRes {

    /**
     * id
     */
    private Long id;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 用户列表
     */
    private List<User> userList = new ArrayList<>();

    /**
     * 子部门列表
     */
    private List<CustomerTransferUserTreeRes> children = new ArrayList<>();

    /**
     * 父节点id
     */
    private Long parentId;

    public CustomerTransferUserTreeRes(Long id, String deptName, Long parentId) {
        this.id = id;
        this.deptName = deptName;
        this.parentId = parentId;
    }

    @Data
    @Accessors(chain = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static class User {

        /**
         * id
         */
        private Long id;

        /**
         * 姓名
         */
        private String name;

        /**
         * 部门id
         */
        private Long deptId;

        /**
         * 管理标签 1-管理员
         */
        private Integer managerFlag;
    }
}
